package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Department;
import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee employee);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee employee);

    List<Employee> queryForData(QueryObject qo);

    //int queryForCount(QueryObject qo);

    void insertRelation(@Param("employeeId") Long employeeId, @Param("roleId") long roleId);

    void delete(Long id);

    void deleteRelation(Long id);

    Employee login(String name);

    void batchDelete(@Param("ids") Long[] ids);

    Employee selectByName(String name);

    List<Employee> selectByPassword(String srcPassword);

    void updatePw(@Param("id") Long id, @Param("newPassword") String newPassword);

    void changeStatus(Long id);

    List<Employee> selectByRoleSn(@Param("sns") String[] sns);
}